mongodb check if field exists java

112

mongodb check if field exists java -

DBObject query;
query = new BasicDBObject("fields_name", new BasicDBObject("$exists", true));
DBCursor result = collection.find(query);

Comments

Submit
0 Comments